package com.itheima.ex;

/**
 * @author by itheima
 * @Date 2022/4/27
 * @Description 定义系统异常，一般是有用户操作不当导致的
 */
public class SystemException extends RuntimeException{
    private Integer code;
    private String msg;

    /**
     *
     * @param code 业务码
     * @param message 错误提示信息
     */
    public SystemException(Integer code, String message) {
        super(message);
        this.code=code;
        this.msg=message;
    }
    public SystemException(Integer code, String message, Throwable cause) {
        super(message, cause);
        this.code=code;
        this.msg=message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
